/* 表格查询 */
export const linkTable = (page, size, blogrollName) => {
  if (!blogrollName) {
    return axios({
      url: `/cms/blogroll/${page}/${size}`,
      method: 'get'
    })
  } else {
    return axios({
      url: `/cms/blogroll/${page}/${size}?blogrollName=${blogrollName}`,
      method: 'get'
    })
  }
}
/* 删除 */
export const delLink = (blogrollId) => {
  return axios({
    url: `/cms/blogroll/${blogrollId}`,
    method: 'delete'
  })
}
/* 新增 */
export const addLink = (data) => {
  return axios({
    url: `/cms/blogroll`,
    method: 'post',
    data
  })
}
/* 编辑 */
export const editLink = (data) => {
  return axios({
    url: `/cms/blogroll`,
    method: 'put',
    data
  })
}

/* 行数据详情 */
export const rowDetails = (blogrollId) => {
  return axios({
    url: `cms/blogroll/${blogrollId}`,
    method: 'get'
  })
}
